package driver;

import java.util.List;

import driver.actions.Action;
import driver.events.Event;
import driver.exceptions.DestroyException;
import driver.exceptions.InitException;

/**
 * Abstract Class that with methods that must be implemented to allow for
 * controlling the desired robot.
 *
 * @author David Martin
 */
public abstract class Controller
{

  /**
   * Must be implemented for each robot driver suite. Gets all of the events
   * available for the robot
   * 
   * @return a set of all events
   */
  public abstract List<Event> getEvents();

  public abstract List<Action> getActions();

  public abstract Event getEventBySafeName(String safeEventName);

  public abstract Action getActionBySafeName(String safeActionName);

  /**
   * Must be implemented for each robot driver suite. Performs the necessary
   * connection steps to allow communication with the robot.
   */
  public abstract void init() throws InitException;

  /**
   * Must be implemented for each robot driver suite. Cleanly closes the connection
   * to the robot.
   */
  public abstract void destroy() throws DestroyException;
}
